<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    　<script src="http://code.jquery.com/jquery-2.1.4.min.js"></script>
</head>
<body>
<script>
    $(function(){
        console.log(1);
        //get请求
        $.ajax({
            type:'get',
            url:'http://localhost:3001/123',
            success:function(data){
                console.log(data);
            },
            error:function(err){
                console.log(err)
            }
        })
        //post请求
        $.ajax({
            type:'post',
            url:'http://localhost:3001/wdltest',
            data:{name:'wdl',pass:'123'},
            success:function(data){
                console.log(data);
            },
            error:function(err){
                console.log(err)
            }
        })
    })
</script>
</body>
</html>